

public class Position {
	private double x, y;
	
	/**
	 * Creates a new Position at (x,y)
	 * @param x
	 * @param y
	 */
	public Position(double x, double y){
		this.x = x;
		this.y = y;
	}
	
	/**
	 * Creates a new position at the same coordinates as another position
	 * @param position
	 */
	public Position(Position position){
		this.x = position.getX();
		this.y = position.getY();
	}
	
	/**
	 * Creates a new Position at (0,0)
	 */
	public Position(){
		this.x = 0;
		this.y = 0;
	}
	
	public void setPosition(Position p){
		this.x = p.getX();
		this.y = p.getY();
	}
	
	public void setX(double x){
		this.x = x;
	}
	
	public void setY(double y){
		this.y = y;
	}
	
	public double getX() {
		return x;
	}
	
	public double getY() {
		return y;
	}
	
	public boolean equals(Position p){
		return(this.x == p.x && this.y == p.y);
	}
}